package com.lb.jwitter.service;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.lb.jwitter.*;
import com.lb.jwitter.hibernate.*;
import com.lb.jwitter.util.ConditionReport;

@Service("tbl_QLDTTXA_ThoiKhoaBieuDuKienService")
@Transactional
@WebService(endpointInterface = "com.lb.jwitter.service.Tbl_QLDTTXA_ThoiKhoaBieuDuKienService")
public class Tbl_QLDTTXA_ThoiKhoaBieuDuKienServiceImpl implements Tbl_QLDTTXA_ThoiKhoaBieuDuKienService,Serializable {

   private Log log = LogFactory.getLog(Tbl_QLDTTXA_ThoiKhoaBieuDuKienServiceImpl.class);
   private static final long serialVersionUID = -8740095022264495229L;

   @Autowired
   @Qualifier("tbl_QLDTTXA_ThoiKhoaBieuDuKienDAO")
   private Tbl_QLDTTXA_ThoiKhoaBieuDuKienDAO _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_NgayTrongTuanDAO")
   private Tbl_QLDTTXA_DM_NgayTrongTuanDAO _tbl_QLDTTXA_DM_NgayTrongTuanDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_PhongDAO")
   private Tbl_QLDTTXA_DM_PhongDAO _tbl_QLDTTXA_DM_PhongDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_TietHocDAO")
   private Tbl_QLDTTXA_DM_TietHocDAO _tbl_QLDTTXA_DM_TietHocDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_HocKyTrongNamDAO")
   private Tbl_QLDTTXA_HocKyTrongNamDAO _tbl_QLDTTXA_HocKyTrongNamDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_LopMonHoc_DuKienDAO")
   private Tbl_QLDTTXA_LopMonHoc_DuKienDAO _tbl_QLDTTXA_LopMonHoc_DuKienDao;

   public final List<Tbl_QLDTTXA_ThoiKhoaBieuDuKien> findAlltbl_QLDTTXA_ThoiKhoaBieuDuKien(int pageSize, int page){
   List<Tbl_QLDTTXA_ThoiKhoaBieuDuKien> result = get_tbl_QLDTTXA_ThoiKhoaBieuDuKienDao().findAll(pageSize, page);
       log.info("Number of user in DB:: "+result.size());
       return result;
   }

   @Transactional(noRollbackFor=IllegalArgumentException.class)
   public final Long createtbl_QLDTTXA_ThoiKhoaBieuDuKien(Tbl_QLDTTXA_ThoiKhoaBieuDuKien obj){
       return _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.save(obj);
   }

   public final void updatetbl_QLDTTXA_ThoiKhoaBieuDuKien(Tbl_QLDTTXA_ThoiKhoaBieuDuKien obj){
       _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.update(obj);
   }//end update methode

   public final Tbl_QLDTTXA_ThoiKhoaBieuDuKien gettbl_QLDTTXA_ThoiKhoaBieuDuKien (Long id){
       log.info("Try to retrieve the tbl_QLDTTXA_ThoiKhoaBieuDuKien: "+id);
       return get_tbl_QLDTTXA_ThoiKhoaBieuDuKienDao().get(id);
   }

   public void deletetbl_QLDTTXA_ThoiKhoaBieuDuKien(Long id){
       log.info("Try to delete the tbl_QLDTTXA_ThoiKhoaBieuDuKien by Id : "+ id);
       if(_tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.exists(id)){
	    _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.delete(id);
       } else {
       	throw new IllegalArgumentException("EmployeeId '"+id+"' does not exists");
       }
   }

   public void deleteListtbl_QLDTTXA_ThoiKhoaBieuDuKien(String[] listId){
       for(String id : listId){
   	    deletetbl_QLDTTXA_ThoiKhoaBieuDuKien(Long.parseLong(id));
       }
   }

   public List<Tbl_QLDTTXA_ThoiKhoaBieuDuKien> findtbl_QLDTTXA_ThoiKhoaBieuDuKienByCondition(List<ConditionReport> cons,int pageSize,int page){ 
       return _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.findByCondition(Tbl_QLDTTXA_ThoiKhoaBieuDuKien.class, cons, pageSize, page); 
   } 
 
   public int counttbl_QLDTTXA_ThoiKhoaBieuDuKienByCondition(List<ConditionReport> cons){ 
       return _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao.countByCondition(Tbl_QLDTTXA_ThoiKhoaBieuDuKien.class, cons); 
   } 
 
   public final Tbl_QLDTTXA_ThoiKhoaBieuDuKienDAO get_tbl_QLDTTXA_ThoiKhoaBieuDuKienDao() {
   	return _tbl_QLDTTXA_ThoiKhoaBieuDuKienDao;
   }
   public final void set_tbl_QLDTTXA_ThoiKhoaBieuDuKienDao(Tbl_QLDTTXA_ThoiKhoaBieuDuKienDAO obj) {
   	this._tbl_QLDTTXA_ThoiKhoaBieuDuKienDao = obj;
   }

   public Tbl_QLDTTXA_DM_NgayTrongTuanDAO get_tbl_QLDTTXA_DM_NgayTrongTuanDao() {
       return _tbl_QLDTTXA_DM_NgayTrongTuanDao;
   }
   public void set_tbl_QLDTTXA_DM_NgayTrongTuanDao(Tbl_QLDTTXA_DM_NgayTrongTuanDAO _tbl_QLDTTXA_DM_NgayTrongTuanDao) {
       this._tbl_QLDTTXA_DM_NgayTrongTuanDao = _tbl_QLDTTXA_DM_NgayTrongTuanDao;
   }

   public Tbl_QLDTTXA_DM_PhongDAO get_tbl_QLDTTXA_DM_PhongDao() {
       return _tbl_QLDTTXA_DM_PhongDao;
   }
   public void set_tbl_QLDTTXA_DM_PhongDao(Tbl_QLDTTXA_DM_PhongDAO _tbl_QLDTTXA_DM_PhongDao) {
       this._tbl_QLDTTXA_DM_PhongDao = _tbl_QLDTTXA_DM_PhongDao;
   }

   public Tbl_QLDTTXA_DM_TietHocDAO get_tbl_QLDTTXA_DM_TietHocDao() {
       return _tbl_QLDTTXA_DM_TietHocDao;
   }
   public void set_tbl_QLDTTXA_DM_TietHocDao(Tbl_QLDTTXA_DM_TietHocDAO _tbl_QLDTTXA_DM_TietHocDao) {
       this._tbl_QLDTTXA_DM_TietHocDao = _tbl_QLDTTXA_DM_TietHocDao;
   }

   public Tbl_QLDTTXA_HocKyTrongNamDAO get_tbl_QLDTTXA_HocKyTrongNamDao() {
       return _tbl_QLDTTXA_HocKyTrongNamDao;
   }
   public void set_tbl_QLDTTXA_HocKyTrongNamDao(Tbl_QLDTTXA_HocKyTrongNamDAO _tbl_QLDTTXA_HocKyTrongNamDao) {
       this._tbl_QLDTTXA_HocKyTrongNamDao = _tbl_QLDTTXA_HocKyTrongNamDao;
   }

   public Tbl_QLDTTXA_LopMonHoc_DuKienDAO get_tbl_QLDTTXA_LopMonHoc_DuKienDao() {
       return _tbl_QLDTTXA_LopMonHoc_DuKienDao;
   }
   public void set_tbl_QLDTTXA_LopMonHoc_DuKienDao(Tbl_QLDTTXA_LopMonHoc_DuKienDAO _tbl_QLDTTXA_LopMonHoc_DuKienDao) {
       this._tbl_QLDTTXA_LopMonHoc_DuKienDao = _tbl_QLDTTXA_LopMonHoc_DuKienDao;
   }

}//endclass

